package com.hsxshop.model;


import org.hibernate.annotations.GenericGenerator;
import org.springframework.transaction.annotation.Transactional;

import javax.persistence.*;

/**
 * Created by wangchongya on 17/7/19.
 */
@Entity
@Table(name="nhsx_manager_user")
public class ManagerUser {

    private int id;
    private String username;
    private String password;
    private String phone;
    private String name;
    private int state;

    private String repassword;

    public ManagerUser(){}
    public ManagerUser(int id, String username, String phone, String name, int state){
        this.id=id;
        this.username=username;
        this.phone=phone;
        this.name=name;
        this.state=state;
    }

    @Id
    @GeneratedValue(generator="increment")
    @GenericGenerator(name="increment", strategy = "increment")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    @Transient
    public String getRepassword() {
        return repassword;
    }

    public void setRepassword(String repassword) {
        this.repassword = repassword;
    }
}
